Refactoring Java Programs using Spoon
نویسندگان
چکیده
TTC’2015 is the 8th Transformation Tool Contest for users and developers of transformation tools. In this paper, we present the use of Spoon, an open-source library to transform and analyze Java source code for the code refactoring track of TTC’2015. We use Spoon to implement pull-up-method and create super-class refactorings. The implementation uses an unmodified revision of Spoon and is done in 125 lines.
منابع مشابه
Refactoring and Retrofitting Design Patterns in Java Software Product Lines
A centerpiece of modern software development is refactoring. Software Product Lines (SPLs), a major software development paradigm, lack tools to refactor Java SPL codebases. X15 introduces our new set of design guidelines, techniques, and language constructs to (1) express feature-based Java SPLs using only Java custom annotations, (2) view programs of the SPL, (3) edit views, automatically pro...
متن کاملComposite Refactorings for Java Programs
There has been much interest in refactoring recently, but little work has been done on tool support for refactoring or on demonstrating that a refactoring does indeed preserve program behaviour. We propose a method for developing composite refactorings for Java programs in such a way that a rigorous demonstration of behaviour preservation is possible.
متن کاملConstrained Java and its Application for Refactoring large Java programs
Constrained Java is a subset of Java which does not allow public classes to be used as static types in any piece of code that belongs to a set of packages, defined as the Constrained Java Package Space. Instead of classes, only interfaces are are used. The enforcement of this rule leads to a very clear distinction between the type hierarchie and the implementation hierarchy. We present methods ...
متن کاملEnhanced semi-Automated Refactoring Engine with Behavioral testing
Refactoring is a transformation that preserves the external behavior of a program and improves its internal quality. Usually, compilation errors and behavioral changes are avoided by preconditions determined for each refactoring transformation. However, to formally define these preconditions and transfer them to program checks is a rather complex task. In practice, refactoring engine developers...
متن کاملOn the Detection of High-Impact Refactoring Opportunities in Programs
We present a novel approach to detect refactoring opportunities by measuring the participation of references between types in instances of patterns representing design flaws. This technique is validated using an experiment where we analyse a set of 95 opensource Java programs for instances of four patterns representing modularisation problems. It turns out that our algorithm can detect high imp...
متن کامل